<template>
	<main-content
		:tableHeight.sync="tableHeight"
		:otherDependenComponents="otherDependenComponents"
	>
		<template slot="query">
			<el-form
				ref="formRef"
				:inline="true"
				:model="queryData"
				class="flex-warp-container"
			>
				<!--				<el-form-item-->
				<!--					:label="$t('common.belong_merchant') + ':'"-->
				<!--					class="flex-row-container"-->
				<!--					label-width="77px"-->
				<!--				>-->
				<!--					<merchant-select-->
				<!--						v-model="queryData.merchantId"-->
				<!--						:merchantInfo.sync="merchantObj"-->
				<!--					></merchant-select>-->
				<!--				</el-form-item>-->
				<el-form-item class="flex-row-container">
					<el-select
						v-model="dateFlag"
						style="width:140px"
						:placeholder="$t('common.please_choose')"
					>
						<!-- <el-option
							:label="$t('report.statistical_month')"
							value="1"
						/> -->
						<el-option
							:label="$t('report.statistical_date')"
							value="0"
						/>
					</el-select>
					<el-date-picker
						v-show="dateFlag === '0'"
						v-model="searchTime"
						type="daterange"
						range-separator="-"
						:start-placeholder="$t('report.start_date')"
						:end-placeholder="$t('report.end_date')"
						:picker-options="pickerShortcutWithCurrPeriod"
						:clearable="false"
					></el-date-picker>
					<el-date-picker
						v-show="dateFlag === '1'"
						v-model="searchTime"
						type="monthrange"
						range-separator="-"
						:start-placeholder="$t('report.start_date')"
						:end-placeholder="$t('report.end_date')"
						:picker-options="pickerOptionsMonth"
						:clearable="false"
					></el-date-picker>
				</el-form-item>
				<el-form-item
					:label="$t('agent.agent_account') + ':'"
					prop="proxyName"
					class="flex-row-container"
					label-width="77px"
				>
					<el-input
						v-model.trim="queryData.proxyName"
						clearable
						size="medium"
						:maxlength="11"
						:placeholder="$t('report.please_input')"
						:disabled="loading"
						v-symbols
						autocomplete="off"
						oninput="value=value.replace(/[\u4E00-\u9FA5]/g ,'')"
						@keyup.enter.native="enterSearch"
					></el-input>
				</el-form-item>
				<el-form-item
					:label="$t('common.direct_superior') + ':'"
					prop="userName"
					class="flex-row-container"
					label-width="77px"
				>
					<el-input
						v-model.trim="queryData.parentProxyName"
						clearable
						size="medium"
						:maxlength="11"
						:placeholder="$t('report.please_input')"
						:disabled="loading"
						autocomplete="off"
						v-symbols
						oninput="value=value.replace(/[\u4E00-\u9FA5]/g ,'')"
						@keyup.enter.native="enterSearch"
					></el-input>
				</el-form-item>
				<el-form-item
					:label="$t('agent.agent_type') + ':'"
					class="proxyItem flex-row-container"
					label-width="77px"
				>
					<el-select
						v-model="queryData.accountType"
						class="proxyInput"
						:placeholder="$t('common.select_all')"
						size="medium"
						clearable
					>
						<el-option
							v-for="item in accountType"
							:key="item.description"
							:label="item.description"
							:value="item.code"
						></el-option>
					</el-select>
				</el-form-item>
				<el-form-item
					:label="$t('report.agency_level')"
					class="flex-row-container"
					label-width="77px"
				>
					<el-select
						v-model="queryData.accountLevelList"
						size="medium"
						:placeholder="$t('common.select_all')"
						clearable
						multiple
						collapse-tags
					>
						<el-option
							v-for="item in proxyleveList"
							:key="item.id"
							:label="item.id"
							:value="item.id"
						></el-option>
					</el-select>
				</el-form-item>
				<!-- <el-form-item
					:label="`${$t('agent.total_bet_amount')}:`"
					class="numberBox flex-row-container"
					label-width="91px"
				>
					<el-input
						v-model="queryData.minBetAmount"
						size="medium"
						:placeholder="$t('common.minimum')"
						style="width: 130px"
						maxLength="15"
						v-input="{ name: 'float', num: '2' }"
						name="minBetAmount"
						clearable
						@blur="
							handleAmount(
								queryData,
								1,
								'minBetAmount',
								'maxBetAmount',
								$t('report.betAmountWarning')
							)
						"
					></el-input>
					-
					<el-input
						v-model="queryData.maxBetAmount"
						size="medium"
						:placeholder="$t('common.maximum')"
						style="width: 130px"
						maxLength="15"
						v-input="{ name: 'float', num: '2' }"
						name="maxBetAmount"
						clearable
						@blur="
							handleAmount(
								queryData,
								2,
								'minBetAmount',
								'maxBetAmount',
								$t('report.betAmountWarning')
							)
						"
					></el-input>
				</el-form-item>
				<el-form-item
					:label="`${$t('report.total_valid_bet_amount')}:`"
					class="numberBox flex-row-container"
					label-width="91px"
				>
					<el-input
						v-model="queryData.minValidBetAmount"
						size="medium"
						:placeholder="$t('common.minimum')"
						style="width: 130px"
						maxLength="15"
						v-input="{ name: 'float', num: '2' }"
						name="minValidBetAmount"
						clearable
						@blur="
							handleAmount(
								queryData,
								1,
								'minValidBetAmount',
								'maxValidBetAmount',
								$t('report.validBetAmountWarning')
							)
						"
					></el-input>
					-
					<el-input
						v-model="queryData.maxValidBetAmount"
						size="medium"
						:placeholder="$t('common.maximum')"
						style="width: 130px"
						maxLength="15"
						v-input="{ name: 'float', num: '2' }"
						name="maxValidBetAmount"
						clearable
						@blur="
							handleAmount(
								queryData,
								2,
								'minValidBetAmount',
								'maxValidBetAmount',
								$t('report.validBetAmountWarning')
							)
						"
					></el-input>
				</el-form-item> -->
				<el-form-item>
					<el-button
						type="primary"
						icon="el-icon-search"
						size="medium"
						@click="search"
					>
						{{ $t('common.search') }}
					</el-button>
					<el-button
						icon="el-icon-refresh-left"
						size="medium"
						@click="reset"
					>
						{{ $t('common.reset') }}
					</el-button>
					<el-button
						v-if="hasPermission('701021')"
						type="warning"
						icon="el-icon-download"
						size="medium"
						:loading="exportBtnLoading"
						@click="handleExportExcel"
					>
						{{ $t('common.export') }}
					</el-button>
					<el-button
						type="success"
						icon="el-icon-sort"
						v-if="dateFlag === '1'"
						:disabled="loading"
						size="medium"
						@click="openColSettings"
					>
						{{ $t('common.row_set') }}
					</el-button>
				</el-form-item>
				<!-- <el-form-item :label="'代理范围' + ':'">
					<el-checkbox
						v-model="selectAllVenue"
						@change="selectAllVenueMethod"
						style="margin-right: 1.2rem"
					>
						{{ $t('operation.activity_list.all_select') }}
					</el-checkbox>
					<el-checkbox-group
						v-model="queryData.venueCodes"
						style="display: inline-block;"
					>
						<el-checkbox
							v-for="(item, index) in venueNameList"
							:label="item.gameCode"
							:key="index"
							style="margin-right: 1.2rem"
						>
							{{ item.venueName }}
						</el-checkbox>
					</el-checkbox-group>
				</el-form-item> -->
				<el-form-item :label="'代理' + ':'">
					<!-- <el-col :span="3" class="agent-label">代理：</el-col> -->

					<div class="flex">
						<el-checkbox
							@change="handleAgentCheck"
							label="all"
							style="margin-right: 1.2rem"
							:value="agentCheckAll"
						>
							全选
						</el-checkbox>
						<el-checkbox-group v-model="agentCheckVals">
							<el-checkbox
								v-for="(v, k) in agentCheckList"
								:label="k"
								:key="k"
								style="margin-right: 1.2rem"
							>
								{{ v }}
							</el-checkbox>
						</el-checkbox-group>
					</div>
				</el-form-item>

				<date-picker-shortcuts
					:kind="shortcutsBtnKind"
					:action="handleShortcutBtnClick"
					:loading="loading"
				/>
			</el-form>
			<el-link :underline="false" type="danger">
				{{ $t('report.refresh_warning_text') }}
			</el-link>
		</template>
		<template slot="content">
			<el-tabs
				v-if="dateFlag === '0'"
				@tab-click="tabClick"
				v-model="activeName"
				type="card"
			>
				<el-tab-pane
					v-for="(item, index) in venueNameList"
					:label="item.venueTypeName"
					:key="index"
					:name="item.venueTypeCode"
				></el-tab-pane>
			</el-tabs>
			<el-table
				v-if="dateFlag === '1'"
				v-loading="loading"
				ref="elTable"
				element-loading-spinner="el-icon-loading"
				border
				size="mini"
				class="small-size-table"
				:data="tableData"
				style="width: 100%"
				:max-height="tableHeight"
				:default-sort="{
					prop: 'member_total_winorloss',
					order: 'descending'
				}"
				:key="headKey"
				v-bind="$attrs"
				v-on="$listeners"
				:cell-class-name="cellClassName"
				:header-cell-class-name="cellClassName"
				@sort-change="changeTableSort"
				show-summary
				:summary-method="
					(val) => handleRow(val, subSummary, totalSummary)
				"
				:header-cell-style="getRowClass"
				highlight-current-row
			>
				<el-table-column
					v-for="(item, index) in newCol"
					:key="`col_${index}`"
					:prop="newCol[index].prop"
					:align="item.alignCenter"
					:label="item.label"
					:min-width="item.minWidth"
					:fixed="item.isFixed"
					:sortable="item.isSortColumn"
					:show-overflow-tooltip="item.isShowTip"
				>
					<!-- 通过插槽为表头绑定mousedown和dragover方法 -->
					<template slot="header" slot-scope="{ column, $index }">
						<span
							@mousedown="
								handleMounseDown($event, column, $index)
							"
							@dragover="handleDragover($event, column, $index)"
							v-if="item.solt == 'percentage'"
						>
							{{ item.label }}
							<el-tooltip
								class="item"
								effect="dark"
								:content="item.itemTipContent"
								placement="top-start"
							>
								<i class="el-icon-question"></i>
							</el-tooltip>
						</span>
						<span
							@mousedown="
								handleMounseDown($event, column, $index)
							"
							@dragover="handleDragover($event, column, $index)"
							v-else
						>
							{{ item.label }}
						</span>
					</template>
					<template slot-scope="{ row }">
						<Copy
							v-if="item.solt === 'copySolt'"
							:title="row[newCol[index].prop]"
							:copy="copy"
						>
							{{ row[newCol[index].prop] }}
						</Copy>
						<div v-if="item.solt === 'filterType'">
							{{
								typeFilter(
									row[newCol[index].prop],
									'accountType'
								)
							}}
						</div>
						<div v-if="item.solt === 'accountStatusSolt'">
							<span
								v-if="row.loginLockStatus === 1"
								class="disableRgba"
							>
								{{ $t('report.login_lock') }}
							</span>
							<span
								v-if="row.paymentLockStatus === 1"
								class="deleteRgba"
							>
								{{ $t('report.account_lock') }}
							</span>
							<span
								v-if="
									row.loginLockStatus === 0 &&
										row.paymentLockStatus === 0
								"
								class="normalRgba"
							>
								{{ $t('report.normal') }}
							</span>
						</div>
						<div v-if="item.solt === 'numberSolt'">
							{{ handleNumber('', row[newCol[index].prop], 0) }}
						</div>
						<div
							v-if="
								item.solt === 'amountSolt' ||
									item.solt === 'percentage'
							"
						>
							<p
								:style="
									item.soltColor
										? handleNumberColor(
												row[newCol[index].prop]
										  )
										: ''
								"
							>
								{{
									handleTotalNumber(
										row.currency,
										row[newCol[index].prop]
									)
								}}
							</p>
						</div>
						<div v-if="item.solt === 'defaultSolt'">
							<span
								v-if="item.isAddColor"
								style="visibility:visible;"
							>
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="dialogData(row)"
								>
									{{ row[newCol[index].prop] || '-' }}
								</el-link>
							</span>
							<span v-else>
								{{ row[newCol[index].prop] || '-' }}
							</span>
						</div>
						<div v-if="item.solt === 'proxyLevelSolt'">
							{{
								(row[newCol[index].prop] === 0
									? '0'
									: row[newCol[index].prop]) || '-'
							}}
						</div>
					</template>
				</el-table-column>
			</el-table>
			<el-table
				v-if="dateFlag === '0' && tabTable"
				v-loading="loading"
				ref="elTable2"
				element-loading-spinner="el-icon-loading"
				border
				size="mini"
				class="small-size-table"
				:data="tableData"
				style="width: 100%"
				:max-height="tableHeight"
				:default-sort="{
					prop: 'member_total_winorloss',
					order: 'descending'
				}"
				:key="headKey"
				v-bind="$attrs"
				v-on="$listeners"
				:cell-class-name="cellClassName"
				:header-cell-class-name="cellClassName"
				@sort-change="changeTableSort"
				show-summary
				:summary-method="
					(val) => handleRow(val, subSummary, totalSummary)
				"
				:header-cell-style="getRowClass"
				highlight-current-row
			>
				<el-table-column align="center" label="账号信息">
					<el-table-column
						prop="userName"
						align="center"
						min-width="200"
						:label="'统计日期'"
					>
						<template slot-scope="scope">
							<span>
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="dialogData(scope.row, 'day')"
								>
									{{ scope.row.cycleName }}
								</el-link>
							</span>
						</template>
					</el-table-column>
					<el-table-column
						prop="userName"
						align="center"
						min-width="200"
						:label="'代理账号'"
					>
						<template slot-scope="scope">
							<span v-if="scope.row.proxyName">
								<span type="primary">
									{{ scope.row.proxyName }}
								</span>
								<i
									class="el-icon-document-copy"
									@click="copy(scope.row.proxyName)"
								/>
							</span>
							<span v-else>-</span>
						</template>
					</el-table-column>
					<el-table-column
						prop="proxyLevel"
						align="center"
						min-width="200"
						:label="'代理层级'"
					>
						<template slot-scope="scope">
							<span>
								{{
									(scope.row.proxyLevel === 0
										? '0'
										: scope.row.proxyLevel) || '-'
								}}
							</span>
							/
							<span>
								{{ scope.row.proxyLevelName || '-' }}
							</span>
						</template>
					</el-table-column>
					<el-table-column
						prop="parentProxyName"
						align="center"
						min-width="200"
						:label="'直属上级'"
					>
						<template slot-scope="scope">
							<span v-if="scope.row.parentProxyName">
								<span>
									{{ scope.row.parentProxyName }}
								</span>
							</span>
							<span v-else>-</span>
						</template>
					</el-table-column>
					<el-table-column
						prop="topProxyName"
						align="center"
						min-width="200"
						:label="'所属总代'"
					>
						<template slot-scope="scope">
							<span v-if="scope.row.topProxyName">
								<span>
									{{ scope.row.topProxyName }}
								</span>
							</span>
							<span v-else>-</span>
						</template>
					</el-table-column>
					<el-table-column
						prop="businessModel"
						align="center"
						min-width="200"
						:label="'业务模式'"
					>
						<template slot-scope="scope">
							{{
								mappingBusinessModel(scope.row.businessModel) ||
									'-'
							}}
						</template>
					</el-table-column>
				</el-table-column>

				<template>
					<el-table-column
						v-if="activeName === 'all'"
						align="center"
						label="代理团队游戏盈亏"
					>
						<el-table-column
							prop="dxClubNetAmount"
							sortable
							align="center"
							min-width="200"
							:label="'德州俱乐部投注盈亏'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxClubNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxClubNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxSquidNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员鱿鱼游戏盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxSquidNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxSquidNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubServiceChargeRoundAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部局服务费'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部局服务费
									<el-tooltip
										class="item"
										effect="dark"
										content="统计会员被收取的局服务费"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.dxClubServiceChargeRoundAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.dxClubServiceChargeRoundAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubServiceChargeContributionRebateAmount"
							sortable
							align="center"
							min-width="230"
							:label="'德州俱乐部服务费贡献分成'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部服务费贡献分成
									<el-tooltip
										class="item"
										effect="dark"
										content="德州俱乐部服务费贡献分成=德州俱乐部服务费贡献*德州俱乐部团队分成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.dxClubServiceChargeContributionRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.dxClubServiceChargeContributionRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureNetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'德州保险投注盈亏'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxInsureNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxInsureNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureNetRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州保险盈亏分成'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州保险盈亏分成
									<el-tooltip
										class="item"
										effect="dark"
										content="德州保险盈亏分成=德州保险投注盈亏*德州保险团队分成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxInsureNetRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxInsureNetRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxValueAddedTotalAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州增值服务消费'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州增值服务消费
									<el-tooltip
										class="item"
										effect="dark"
										content="会员在德州场馆内因增值服务、商城、返利等功能引起的资金变动。"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxValueAddedTotalAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxValueAddedTotalAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxValueAddedTotalRebateAmount"
							align="center"
							min-width="200"
							sortable
							:label="'德州增值服务消费分成'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州增值服务消费分成
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期获得的会员增值服务消费的分成金额。"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.dxValueAddedTotalRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.dxValueAddedTotalRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆投注盈亏'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="230"
							:label="'其他场馆投注盈亏重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆投注盈亏重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="统计因注单重算而导致的投注盈亏金额调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'全部'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherPartNetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'其他场馆投注盈亏分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆投注盈亏分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="其他场馆投注盈亏分摊=其他场馆会员投注盈亏*其他场馆代理团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherPartNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherRebateAmount"
							align="center"
							min-width="200"
							sortable
							:label="'其他场馆有效投注返点'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆有效投注返点
									<el-tooltip
										class="item"
										effect="dark"
										content="其他场馆有效投注返点=其他场馆会员有效投注*其他场馆代理返点比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherPartRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆团队返点分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆团队返点分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="其他场馆团队返点分摊=其他场馆团队返点*其他场馆团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherPartRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆返点重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆返点重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="由于注单重算引起的代理返点金额变动差值"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentRebateDialogFn(
											scope.row,
											'全部'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherPartRebateRecalculationAmount"
							align="center"
							min-width="200"
							sortable
							:label="'其他场馆返点重算分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆返点重算分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="其他场馆返点重算分摊=其他场馆返点重算调整*其他场馆团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherPartRebateRecalculationAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherAmount"
							sortable
							align="center"
							min-width="200"
							:label="'其他收支项'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他收支项
									<el-tooltip
										class="item"
										effect="dark"
										content="其他收支项=真人场馆会员真人打赏金额+电子场馆会员电子活动奖金金额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="otherDialogFn(scope.row)"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
					</el-table-column>
					<el-table-column
						v-if="activeName === 'all'"
						align="center"
						label="代理团队盈亏调整"
					>
						<el-table-column
							prop="memberRebateAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员返水调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									会员返水调整
									<el-tooltip
										class="item"
										effect="dark"
										content="会员返水调整=其他返水增加调整-其他返水扣除调整+俱乐部返水增加调整-俱乐部返水扣除调整+保险返水增加调整-保险返水扣除调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.memberRebateAdjustmentAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.memberRebateAdjustmentAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="memberAccountAdjustmentAmount"
							align="center"
							min-width="200"
							sortable
							:label="'会员账户调整'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.memberAccountAdjustmentAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.memberAccountAdjustmentAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="proxyRebateAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'代理收入调整'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.proxyRebateAdjustmentAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.proxyRebateAdjustmentAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="proxyAccountAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'代理账户调整'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.proxyAccountAdjustmentAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.proxyAccountAdjustmentAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherAdjustmentTotalNetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'其他盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="其他盈亏=会员返水调整+会员账户调整+代理收入调整+代理账户调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.otherAdjustmentTotalNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherAdjustmentTotalNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
					<el-table-column
						v-if="activeName === 'all'"
						align="center"
						label="代理团队总盈亏"
					>
						<el-table-column
							prop="totalNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'总盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									总盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="总盈亏=德州场馆盈亏+其他场馆盈亏+其他盈亏"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.totalNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.totalNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 德州场馆 -->
				<template>
					<el-table-column
						v-if="activeName === 'dz'"
						align="center"
						label="代理团队德州游戏盈亏"
					>
						<el-table-column
							prop="dxClubServiceChargeHandBetCount"
							align="center"
							min-width="200"
							sortable
							:label="'德州俱乐部注单量'"
						>
							<template slot-scope="scope">
								<span>
									{{
										scope.row
											.dxClubServiceChargeHandBetCount
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部投注盈亏'"
						>
							<!-- <template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部投注盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="统计会员被收取的局服务费"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template> -->
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxClubNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxClubNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxSquidNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员鱿鱼游戏盈亏'"
							show-overflow-tooltip
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxSquidNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxSquidNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubServiceChargeRoundAmount"
							align="center"
							min-width="200"
							sortable
							:label="'德州俱乐部局服务费'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部局服务费
									<el-tooltip
										class="item"
										effect="dark"
										content="统计会员被收取的局服务费"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.dxClubServiceChargeRoundAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.dxClubServiceChargeRoundAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubServiceChargeHandAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州俱乐部手牌服务费'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.dxClubServiceChargeHandAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.dxClubServiceChargeHandAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubTotalServiceChargeContributionAmount"
							align="center"
							min-width="200"
							sortable
							:label="'德州俱乐部服务费贡献'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部服务费贡献
									<el-tooltip
										class="item"
										effect="dark"
										content="德州俱乐部服务费贡献=局服务费贡献+手牌服务费贡献"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										serviceFeeContributionDialogFn(
											scope.row
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.dxClubTotalServiceChargeContributionAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxClubServiceChargeContributionRebateAmount"
							sortable
							align="center"
							min-width="230"
							:label="'德州俱乐部服务费贡献分成'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州俱乐部服务费贡献分成
									<el-tooltip
										class="item"
										effect="dark"
										content="德州俱乐部服务费贡献分成=德州俱乐部服务费贡献*德州俱乐部团队分成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.dxClubServiceChargeContributionRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.dxClubServiceChargeContributionRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureBetCount"
							align="center"
							sortable
							min-width="200"
							:label="'德州保险注单量'"
						>
							<!-- <template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州保险注单量
									<el-tooltip
										class="item"
										effect="dark"
										content="德州俱乐部服务费贡献分成=德州俱乐部服务费贡献*德州俱乐部团队分成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template> -->
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'',
											scope.row.dxInsureBetCount,
											0
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureBetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'德州保险投注金额'"
						>
							<template slot-scope="scope">
								<span>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxInsureBetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州保险有效投注'"
						>
							<template slot-scope="scope">
								<span>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxInsureValidBetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureNetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'德州保险投注盈亏'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxInsureNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxInsureNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxInsureNetRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州保险盈亏分成'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州保险盈亏分成
									<el-tooltip
										class="item"
										effect="dark"
										content="德州保险盈亏分成=德州保险投注盈亏*德州保险团队分成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxInsureNetRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxInsureNetRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxValueAddedTotalAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州增值服务消费'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州增值服务消费
									<el-tooltip
										class="item"
										effect="dark"
										content="会员在德州场馆内因增值服务、商城、返利等功能引起的资金变动。"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxValueAddedTotalAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxValueAddedTotalAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxValueAddedTotalRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州增值服务消费分成'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州增值服务消费分成
									<el-tooltip
										class="item"
										effect="dark"
										content="统计当期获得的会员增值服务消费的分成金额。"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row
												.dxValueAddedTotalRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.dxValueAddedTotalRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dxTotalNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'德州场馆盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									德州场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="德州场馆盈亏=德州俱乐部投注盈亏+会员鱿鱼游戏盈亏+德州俱乐部局服务费+德州保险投注盈亏+德州增值服务消费+德州俱乐部会员返水"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dxTotalNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dxTotalNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 其他 -->
				<template>
					<el-table-column
						v-if="activeName === 'other'"
						align="center"
						label="代理团队其他场馆游戏盈亏"
					>
						<el-table-column
							prop="otherBetCount"
							align="center"
							sortable
							min-width="200"
							:label="'注单量'"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'',
											scope.row.otherBetCount,
											0
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆投注金额'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.otherBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="otherNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆投注盈亏'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="230"
							:label="'其他场馆投注盈亏重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆投注盈亏重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="统计因注单重算而导致的投注盈亏金额调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'其他'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherPartNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆投注盈亏分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆投注盈亏分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="其他场馆投注盈亏分摊=其他场馆会员投注盈亏*其他场馆代理团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherPartNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆有效投注'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.otherValidBetAmount
									)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="otherRebateAmount"
							align="center"
							min-width="200"
							sortable
							:label="'其他场馆有效投注返点'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆有效投注返点
									<el-tooltip
										class="item"
										effect="dark"
										content="其他场馆有效投注返点=其他场馆会员有效投注*其他场馆代理返点比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherPartRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆团队返点分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆团队返点分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="其他场馆团队返点分摊=其他场馆团队返点*其他场馆团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherPartRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherRebateRecalculationAdjustmentAmount"
							align="center"
							min-width="200"
							sortable
							:label="'其他场馆返点重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆返点重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="由于注单重算引起的代理返点金额变动差值"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentRebateDialogFn(
											scope.row,
											'其他'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherPartRebateRecalculationAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他场馆返点重算分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆返点重算分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="其他场馆返点重算分摊=其他场馆返点重算调整*其他场馆团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.otherPartRebateRecalculationAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherAmount"
							align="center"
							sortable
							min-width="200"
							:label="'其他收支项'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他收支项
									<el-tooltip
										class="item"
										effect="dark"
										content="其他收支项=真人场馆会员真人打赏金额+电子场馆会员电子活动奖金金额"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="otherDialogFn(scope.row)"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="otherTotalNetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'其他场馆盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									其他场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="其他场馆盈亏=其他场馆投注盈亏+其他场馆投注盈亏重算调整+其他场馆有效投注返点+其他场馆返点重算调整+其他收支项"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.otherTotalNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.otherTotalNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 体育 -->
				<template>
					<el-table-column
						v-if="activeName === 'ty'"
						align="center"
						label="代理团队体育场馆游戏盈亏"
					>
						<el-table-column
							prop="tyBetCount"
							sortable
							align="center"
							min-width="150"
							:label="'注单量'"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'',
											scope.row.tyBetCount,
											0
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="tyBetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'体育场馆投注金额'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.tyBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="tyNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'体育场馆投注盈亏'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(scope.row.tyNetAmount)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.tyNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="tyNetRecalculationAdjustmentAmount"
							align="center"
							min-width="230"
							sortable
							:label="'体育场馆投注盈亏重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									体育场馆投注盈亏重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="统计因注单重算而导致的投注盈亏金额调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'体育'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.tyNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="tyPartNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'体育场馆投注盈亏分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									体育场馆投注盈亏分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="投注盈亏分摊=会员投注盈亏*代理团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.tyPartNetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="tyValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'体育场馆有效投注'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.tyValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="tyRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'体育场馆有效投注返点'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									体育场馆有效投注返点
									<el-tooltip
										class="item"
										effect="dark"
										content="有效投注返点=会员有效投注*代理返点比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.tyRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.tyRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="tyPartRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'体育场馆团队返点分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									体育场馆团队返点分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="团队返点分摊=团队返点*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.tyPartRebateAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="tyRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'体育场馆返点重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									体育场馆返点重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="由于注单重算引起的代理返点金额变动差值"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentRebateDialogFn(
											scope.row,
											'体育'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.tyRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="tyPartRebateRecalculationAmount"
							align="center"
							sortable
							min-width="200"
							:label="'体育场馆返点重算分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									体育场馆返点重算分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="返点重算分摊=返点重算调整*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row
											.tyPartRebateRecalculationAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="tyTotalNetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'体育场馆盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									体育场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="体育场馆盈亏=体育场馆投注盈亏+体育场馆投注盈亏重算调整+体育场馆有效投注返点+体育场馆返点重算调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.tyTotalNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.tyTotalNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 真人 -->
				<template>
					<el-table-column
						v-if="activeName === 'zr'"
						align="center"
						label="代理团队真人场馆游戏盈亏"
					>
						<el-table-column
							prop="zrBetCount"
							sortable
							align="center"
							min-width="150"
							:label="'注单量'"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'',
											scope.row.zrBetCount,
											0
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'真人场馆投注金额'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.zrBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'真人场馆投注盈亏'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(scope.row.zrNetAmount)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.zrNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="230"
							:label="'真人场馆投注盈亏重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									真人场馆投注盈亏重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="统计因注单重算而导致的投注盈亏金额调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'真人'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.zrNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrPartNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'真人场馆投注盈亏分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									真人场馆投注盈亏分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="投注盈亏分摊=会员投注盈亏*代理团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.zrPartNetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'真人场馆有效投注'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.zrValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'真人场馆有效投注返点'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									真人场馆有效投注返点
									<el-tooltip
										class="item"
										effect="dark"
										content="有效投注返点=会员有效投注*代理返点比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.zrRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.zrRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrPartRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'真人场馆团队返点分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									真人场馆团队返点分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="团队返点分摊=团队返点*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.zrPartRebateAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrRebateRecalculationAdjustmentAmount"
							align="center"
							min-width="200"
							sortable
							:label="'真人场馆返点重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									真人场馆返点重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="由于注单重算引起的代理返点金额变动差值"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentRebateDialogFn(
											scope.row,
											'真人'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.zrRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="zrPartRebateRecalculationAmount"
							align="center"
							sortable
							min-width="200"
							:label="'真人场馆返点重算分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									真人场馆返点重算分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="返点重算分摊=返点重算调整*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row
											.zrPartRebateRecalculationAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrRewardAmount"
							align="center"
							sortable
							min-width="200"
							:label="'会员打赏'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.zrRewardAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="zrTotalNetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'真人场馆盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									真人场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="真人场馆盈亏=真人场馆投注盈亏+真人场馆投注盈亏重算调整+真人场馆有效投注返点+真人场馆返点重算调整+会员打赏"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.zrTotalNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.zrTotalNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 棋牌 -->
				<template>
					<el-table-column
						v-if="activeName === 'qp'"
						align="center"
						label="棋牌场馆流水输赢"
					>
						<el-table-column
							prop="qpBetCount"
							align="center"
							sortable
							min-width="150"
							:label="'注单量'"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'',
											scope.row.qpBetCount,
											0
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="qpBetAmount"
							sortable
							align="center"
							min-width="200"
							:label="'棋牌场馆投注金额'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.qpBetAmount)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="qpNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'棋牌场馆投注盈亏'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.qpNetAmount)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="qpPartNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'棋牌场馆投注盈亏分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									棋牌场馆投注盈亏分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="投注盈亏分摊=会员投注盈亏*代理团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.qpPartNetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="qpValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'有效投注'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.qpValidBetAmount
									)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="qpRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'棋牌场馆有效投注返点'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									棋牌场馆有效投注返点
									<el-tooltip
										class="item"
										effect="dark"
										content="有效投注返点=会员有效投注*代理返点比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.qpRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.qpRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>

						<el-table-column
							prop="qpPartRebateAmount"
							align="center"
							min-width="200"
							sortable
							:label="'棋牌场馆团队返点分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									棋牌场馆团队返点分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="团队返点分摊=团队返点*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.qpPartRebateAmount
									)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="qpTotalNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'棋牌场馆盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									棋牌场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="棋牌场馆盈亏=棋牌场馆投注盈亏+棋牌场馆有效投注返点"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.qpTotalNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.qpTotalNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 电竞 -->
				<template>
					<el-table-column
						v-if="activeName === 'dj'"
						align="center"
						label="代理团队电竞场馆游戏盈亏"
					>
						<el-table-column
							prop="djBetCount"
							sortable
							align="center"
							min-width="150"
							:label="'注单量'"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'',
											scope.row.djBetCount,
											0
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="djBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电竞场馆投注金额'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.djBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="djNetAmount"
							sortable
							align="center"
							min-width="200"
							:label="'电竞场馆投注盈亏'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(scope.row.djNetAmount)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.djNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="djNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="230"
							:label="'电竞场馆投注盈亏重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电竞场馆投注盈亏重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="统计因注单重算而导致的投注盈亏金额调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'电竞'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.djNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="djPartNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电竞场馆投注盈亏分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电竞场馆投注盈亏分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="投注盈亏分摊=会员投注盈亏*代理团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.djPartNetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="djValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电竞场馆有效投注'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.djValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="djRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电竞场馆有效投注返点'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电竞场馆有效投注返点
									<el-tooltip
										class="item"
										effect="dark"
										content="有效投注返点=会员有效投注*代理返点比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.djRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.djRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="djPartRebateAmount"
							sortable
							align="center"
							min-width="200"
							:label="'电竞场馆团队返点分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电竞场馆团队返点分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="团队返点分摊=团队返点*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.djPartRebateAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="djRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电竞场馆返点重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电竞场馆返点重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="由于注单重算引起的代理返点金额变动差值"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentRebateDialogFn(
											scope.row,
											'电竞'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.djRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="djPartRebateRecalculationAmount"
							align="center"
							min-width="200"
							sortable
							:label="'电竞场馆返点重算分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电竞场馆返点重算分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="返点重算分摊=返点重算调整*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row
											.djPartRebateRecalculationAmount
									)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="djTotalNetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'电竞场馆盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电竞场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="电竞场馆盈亏=电竞场馆投注盈亏+电竞场馆投注盈亏重算调整+电竞场馆有效投注返点+电竞场馆返点重算调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.djTotalNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.djTotalNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>

				<!-- 彩票 -->

				<template>
					<el-table-column
						v-if="activeName === 'cp'"
						align="center"
						label="代理团队彩票场馆游戏盈亏"
					>
						<el-table-column
							prop="cpBetCount"
							sortable
							align="center"
							min-width="150"
							:label="'注单量'"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'',
											scope.row.cpBetCount,
											0
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="cpBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'彩票场馆投注金额'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.cpBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="cpNetAmount"
							sortable
							align="center"
							min-width="200"
							:label="'彩票场馆投注盈亏'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(scope.row.cpNetAmount)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.cpNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="cpNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="230"
							:label="'彩票场馆投注盈亏重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆投注盈亏重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="统计因注单重算而导致的投注盈亏金额调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.cpNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="cpPartNetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'彩票场馆投注盈亏分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆投注盈亏分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="投注盈亏分摊=会员投注盈亏*代理团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.cpPartNetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="cpValidBetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'彩票场馆有效投注'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.cpValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="cpRebateAmount"
							sortable
							align="center"
							min-width="200"
							:label="'彩票场馆有效投注返点'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆有效投注返点
									<el-tooltip
										class="item"
										effect="dark"
										content="有效投注返点=会员有效投注*代理返点比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.cpRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.cpRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="cpPartRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'彩票场馆团队返点分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆团队返点分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="团队返点分摊=团队返点*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.cpPartRebateAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="cpRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'彩票场馆返点重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆返点重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="由于注单重算引起的代理返点金额变动差值"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentRebateDialogFn(
											scope.row,
											'彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.cpRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="cpPartRebateRecalculationAmount"
							align="center"
							min-width="200"
							sortable
							:label="'彩票场馆返点重算分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆返点重算分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="返点重算分摊=返点重算调整*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row
											.cpPartRebateRecalculationAmount
									)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="cpTotalNetAmount"
							sortable
							align="center"
							min-width="200"
							:label="'彩票场馆盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="彩票场馆盈亏=彩票场馆投注盈亏+彩票场馆投注盈亏重算调整+彩票场馆有效投注返点+彩票场馆返点重算调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.cpTotalNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.cpTotalNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- HC彩票 -->

				<template>
					<el-table-column
						v-if="activeName === 'hccp'"
						align="center"
						label="代理团队彩票场馆游戏盈亏"
					>
						<el-table-column
							prop="hccpBetCount"
							sortable
							align="center"
							min-width="150"
							:label="'注单量'"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'',
											scope.row.hccpBetCount,
											0
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'彩票场馆投注金额'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.hccpBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpNetAmount"
							sortable
							align="center"
							min-width="200"
							:label="'彩票场馆投注盈亏'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.hccpNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.hccpNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpNetRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="230"
							:label="'彩票场馆投注盈亏重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆投注盈亏重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="统计因注单重算而导致的投注盈亏金额调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentDialogFn(
											scope.row,
											'hc彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.hccpNetRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpPartNetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'彩票场馆投注盈亏分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆投注盈亏分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="投注盈亏分摊=会员投注盈亏*代理团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.hccpPartNetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpValidBetAmount"
							align="center"
							min-width="200"
							sortable
							:label="'彩票场馆有效投注'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.hccpValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpRebateAmount"
							sortable
							align="center"
							min-width="200"
							:label="'彩票场馆有效投注返点'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆有效投注返点
									<el-tooltip
										class="item"
										effect="dark"
										content="有效投注返点=会员有效投注*代理返点比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.hccpRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.hccpRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpPartRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'彩票场馆团队返点分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆团队返点分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="团队返点分摊=团队返点*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.hccpPartRebateAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpRebateRecalculationAdjustmentAmount"
							align="center"
							sortable
							min-width="200"
							:label="'彩票场馆返点重算调整'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆返点重算调整
									<el-tooltip
										class="item"
										effect="dark"
										content="由于注单重算引起的代理返点金额变动差值"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<el-link
									class="lightBlueColor"
									type="primary"
									@click="
										recalculationAdjustmentRebateDialogFn(
											scope.row,
											'hc彩票'
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row
												.hccpRebateRecalculationAdjustmentAmount
										)
									}}
								</el-link>
							</template>
						</el-table-column>
						<el-table-column
							prop="hccpPartRebateRecalculationAmount"
							align="center"
							min-width="200"
							sortable
							:label="'彩票场馆返点重算分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆返点重算分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="返点重算分摊=返点重算调整*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row
											.hccpPartRebateRecalculationAmount
									)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="hccpTotalNetAmount"
							sortable
							align="center"
							min-width="200"
							:label="'彩票场馆盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									彩票场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="彩票场馆盈亏=彩票场馆投注盈亏+彩票场馆投注盈亏重算调整+彩票场馆有效投注返点+彩票场馆返点重算调整"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.hccpTotalNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.hccpTotalNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
				<!-- 电子 -->
				<template>
					<el-table-column
						v-if="activeName === 'dy'"
						align="center"
						label="代理团队电子场馆游戏盈亏"
					>
						<el-table-column
							prop="dyBetCount"
							align="center"
							sortable
							min-width="150"
							:label="'注单量'"
						>
							<template slot-scope="scope">
								<span>
									{{
										handleNumber(
											'',
											scope.row.dyBetCount,
											0
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dyBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电子场馆投注金额'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber('USDT', scope.row.dyBetAmount)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dyNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电子场馆投注盈亏'"
						>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(scope.row.dyNetAmount)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dyNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>

						<el-table-column
							prop="dyPartNetAmount"
							sortable
							align="center"
							min-width="200"
							:label="'电子场馆投注盈亏分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电子场馆投注盈亏分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="投注盈亏分摊=会员投注盈亏*代理团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dyPartNetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dyValidBetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电子场馆有效投注'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dyValidBetAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dyRebateAmount"
							align="center"
							min-width="200"
							sortable
							:label="'电子场馆有效投注返点'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电子场馆有效投注返点
									<el-tooltip
										class="item"
										effect="dark"
										content="有效投注返点=会员有效投注*代理返点比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dyRebateAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dyRebateAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
						<el-table-column
							prop="dyPartRebateAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电子场馆团队返点分摊'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电子场馆团队返点分摊
									<el-tooltip
										class="item"
										effect="dark"
										content="团队返点分摊=团队返点*团队占成比例"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dyPartRebateAmount
									)
								}}
							</template>
						</el-table-column>
						<el-table-column
							prop="dyActivityBonus"
							align="center"
							sortable
							min-width="200"
							:label="'电子活动奖金'"
						>
							<template slot-scope="scope">
								{{ handleCurrency('USDT') }}
								{{
									handleNumber(
										'USDT',
										scope.row.dyActivityBonus
									)
								}}
							</template>
						</el-table-column>

						<el-table-column
							prop="dyTotalNetAmount"
							align="center"
							sortable
							min-width="200"
							:label="'电子场馆盈亏'"
						>
							<template
								slot="header"
								slot-scope="{ column, $index }"
							>
								<span>
									电子场馆盈亏
									<el-tooltip
										class="item"
										effect="dark"
										content="电子场馆盈亏=电子场馆投注盈亏+电子场馆有效投注返点+电子活动奖金"
										placement="top-start"
									>
										<i class="el-icon-question"></i>
									</el-tooltip>
								</span>
							</template>
							<template slot-scope="scope">
								<span
									:style="
										handleNumberColor(
											scope.row.dyTotalNetAmount
										)
									"
								>
									{{ handleCurrency('USDT') }}
									{{
										handleNumber(
											'USDT',
											scope.row.dyTotalNetAmount
										)
									}}
								</span>
							</template>
						</el-table-column>
					</el-table-column>
				</template>
			</el-table>
			<!-- 分页 -->
			<el-pagination
				v-show="!!total"
				class="pageValue"
				:current-page.sync="pageNum"
				background
				layout="total, sizes,prev, pager, next, jumper"
				:page-size.sync="pageSize"
				:page-sizes="pageSizes"
				:total="total"
				:pager-count="9"
				@current-change="handleCurrentChange"
				@size-change="handleSizeChange"
			></el-pagination>
		</template>
		<detail-page
			v-if="showDialog"
			:rowVal="rowVal"
			:closeDialog="
				(val) => {
					showDialog = val
				}
			"
		/>
		<detail-day-page
			v-if="showDayDialog"
			:rowVal="rowVal"
			:activeName="activeName"
			:closeDialog="
				(val) => {
					showDayDialog = val
				}
			"
		/>
		<venue-page
			v-if="showVenueDialog"
			:rowVal="rowVal"
			:closeDialog="
				(val) => {
					showVenueDialog = val
				}
			"
		/>
		<OtherDialog
			v-if="otherDialog"
			:visible.sync="otherDialog"
			@handleVisible="otherDialog = false"
			:curData="rowVal"
		/>
		<ServiceFeeContributionDialog
			v-if="serviceFeeContributionDialog"
			:visible.sync="serviceFeeContributionDialog"
			@handleVisible="serviceFeeContributionDialog = false"
			:curData="rowVal"
		/>
		<RecalculationAdjustmentDialog
			v-if="recalculationAdjustmentDialog"
			:searchTime="searchTime"
			:visible.sync="recalculationAdjustmentDialog"
			@handleVisible="recalculationAdjustmentDialog = false"
			:curData="rowVal"
		/>
		<RecalculationAdjustmentRebateDialog
			v-if="recalculationAdjustmentRebateDialog"
			:searchTime="searchTime"
			:visible.sync="recalculationAdjustmentRebateDialog"
			@handleVisible="recalculationAdjustmentRebateDialog = false"
			:curData="rowVal"
		/>
		<el-dialog
			:title="$t('common.row_set')"
			center
			:visible.sync="colSettings.visible"
			width="475px"
			class="setting-div"
			:before-close="cancleSetColumn"
		>
			<div>
				<el-link type="primary" class="mb15" @click="clickDel">
					复原缺省
				</el-link>
			</div>
			<div
				v-for="(item, index) in oldCol"
				:key="index"
				class="setting-div"
			>
				<el-checkbox v-if="index !== 0" v-model="item.isShow">
					{{ item.label }}
				</el-checkbox>
			</div>
			<div slot="footer" class="dialog-footer">
				<el-button @click="cancleSetColumn()">
					{{ $t('common.cancel') }}
				</el-button>
				<el-button type="primary" @click="handleOrderList">
					{{ $t('common.submit') }}
				</el-button>
			</div>
		</el-dialog>
	</main-content>
</template>

<script>
import list from '@/mixins/list'
import dayjs from 'dayjs'
// import Sortable from 'sortablejs'
import { getColumns } from './components/columns'
import { Storage } from '@/utils/compose'
import { routerNames } from '@/utils/consts'
import summaryList from './components/summaryList'
import MainContent from '@/components/MainContent/index'
import OtherDialog from './components/otherDialog.vue'
import ServiceFeeContributionDialog from './components/serviceFeeContributionDialog.vue'
import RecalculationAdjustmentDialog from './components/recalculationAdjustmentDialog.vue'
import RecalculationAdjustmentRebateDialog from './components/recalculationAdjustmentRebateDialog.vue'

import DatePickerShortcuts from '@/components/DatePickerShortcuts'

export default {
	name: routerNames.proxyProfitAndLoss,
	components: {
		DetailPage: () => import('./components/detail-page.vue'),
		DetailDayPage: () => import('./components/detail-day-page.vue'),
		VenuePage: () => import('./components/venue-page.vue'),
		MainContent,
		ServiceFeeContributionDialog,
		OtherDialog,
		RecalculationAdjustmentRebateDialog,
		RecalculationAdjustmentDialog,
		DatePickerShortcuts
	},
	mixins: [list, summaryList],
	data() {
		return {
			otherDialog: false,
			tabTable: true,
			agentCheckVals: ['1'],
			recalculationAdjustmentRebateDialog: false,
			recalculationAdjustmentDialog: false,
			serviceFeeContributionDialog: false,
			tableHeight: 480,
			activeName: 'all',
			venueNameList: [
				{
					venueTypeName: '全部场馆',
					venueTypeCode: 'all'
				},
				{
					venueTypeName: 'DX德州',
					venueTypeCode: 'dz'
				},
				{
					venueTypeName: '其他场馆',
					venueTypeCode: 'other'
				},
				{
					venueTypeName: 'DB体育',
					venueTypeCode: 'ty'
				},
				{
					venueTypeName: 'DB真人',
					venueTypeCode: 'zr'
				},
				{
					venueTypeName: '博雅棋牌',
					venueTypeCode: 'qp'
				},
				{
					venueTypeName: 'DB电竞',
					venueTypeCode: 'dj'
				},
				{
					venueTypeName: 'DB彩票',
					venueTypeCode: 'cp'
				},
				{
					venueTypeName: 'HC彩票',
					venueTypeCode: 'hccp'
				},
				{
					venueTypeName: 'DB电子',
					venueTypeCode: 'dy'
				}
			],
			otherDependenComponents: [],
			queryData: {
				accountLevelList: [],
				userName: '',
				minBetAmount: undefined,
				maxBetAmount: undefined,
				minValidBetAmount: undefined,
				maxValidBetAmount: undefined
			},
			title: '',
			dateFlag: '0',
			searchFlag: undefined,
			searchTime: [],
			proxyleveList: [],
			accountFlag: 'proxyName',
			tableData: [],
			subSummary: {},
			totalSummary: {},
			exportBtnLoading: false,
			showDialog: false,
			showDayDialog: false,
			showVenueDialog: false,
			rowVal: {},
			agentCheckList: {
				'1': '自身',
				'2': '直属下级代理',
				'3': '全部下级代理'
			},
			merchantObj: '',
			oldCol: [],
			dropCol: [],
			newCol: [],
			loading: false,
			axiosDate: '',
			colSettings: {
				visible: false
			},
			// 拖拽状态
			dragState: {
				start: -3, // 起始元素的 index 防止初始化cellStyle时序号、展开等默认样式改变，最好小于-3
				end: -3, // 移动鼠标时所覆盖的元素 index
				dragging: false, // 是否正在拖动
				direction: undefined // 拖动方向
			},
			headKey: 'proxyProfitAndLoss', // 表头数组变换位置时，重绘table（不更新该值，表头数组变化时，页面不会改变）
			scrollX: 0 // 初始x轴scroll位置（用于定位X轴滚动条）
		}
	},
	computed: {
		agentCheckAll() {
			return this.agentCheckVals.length === 3
		},
		accountType() {
			return this.globalDics.accountType || []
		},
		shortcutsBtnKind() {
			return this.dateFlag !== '0'
				? 'shortcutsMonth'
				: 'shortcutForButtons'
		}
	},
	watch: {
		dateFlag: {
			handler(newVal, oldVal) {
				this.tableData = []
				this.oldCol = []
				delete this.queryData.orderKey
				delete this.queryData.orderType
				this.$nextTick(() => {
					if (newVal === '0') {
						this.oldCol = this.dropCol.day
					} else {
						this.oldCol = this.dropCol.month
					}
				})
				if (newVal === '0') {
					const end = dayjs().endOf('day')
					const start = dayjs().startOf('day')
					this.searchTime = [start, end]
				} else {
					const end = dayjs().endOf('day')
					const start = dayjs().startOf('month')
					this.searchTime = [start, end]
				}
			},
			immediate: true
		},
		accountFlag: {
			handler(newVal, oldVal) {
				this.$set(this.queryData, newVal, '')
				this.$set(this.queryData, oldVal, '')
			}
		},
		oldCol: {
			handler(newVal) {
				if (newVal) {
					setTimeout(() => {
						this.newCol = newVal.filter((its) => {
							return its.isShow === true
						})
					}, 1000)
				}
			},
			deep: true
		}
	},
	created() {
		this.$store.dispatch('user/updateCurrentAccountPeriod')
		this.getProxyleve()
		const storageColumn = this.getSaveTableData()
		this.dropCol = getColumns()
		const uu_Id = this.$store.state.user.userInfo?.id
		this.oldCol =
			storageColumn &&
			storageColumn[`${uu_Id}_commonTableKey_proxyProfitAndLoss`]
				? storageColumn[`${uu_Id}_commonTableKey_proxyProfitAndLoss`]
				: this.dropCol.month
		console.log(
			storageColumn &&
				storageColumn[`${uu_Id}_commonTableKey_proxyProfitAndLoss`],
			'this.oldColthis.oldColthis.oldCol'
		)
		this.newCol = this.oldCol
	},
	mounted() {},
	methods: {
		handleAgentCheck(bool, e) {
			// all
			if (e.target.value === 'all') {
				if (bool) {
					this.agentCheckVals = Object.keys(this.agentCheckList)
				} else {
					this.agentCheckVals = []
				}
			}
		},
		tabClick() {
			this.tabTable = false
			this.$nextTick(() => {
				if (this.dateFlag === '1') {
					this.tabTable = false
				} else {
					this.tabTable = true
				}
			})

			console.log('dd')
		},
		handleShortcutBtnClick(val) {
			this.searchTime = val
			this.search()
		},
		// 鼠标摁下触发
		handleMounseDown(e, column, $index) {
			this.dragState.dragging = true
			this.dragState.start = parseInt($index - 0)
			// 添加鼠标抬起事件  消除鼠标摁下立刻松开问题
			document.addEventListener('mouseup', this.handleMouseUp)
			// 添加拖拽结束事件
			document.addEventListener('dragend', this.handleMouseUp)
			// 对选中的表头允许其拖拽
			const dragclass = '.el-table__header-wrapper .' + column.id
			const dragDom = document.querySelectorAll(dragclass)
			dragDom.forEach((dom) => {
				// 允许表头块可以被拖拽 draggable 属性 不允许拖拽dragover等相关拖拽事件无法触发
				dom.setAttribute('draggable', true)
			})
		},
		/** 鼠标在拖拽移动时触发 */
		handleDragover(e, column, $index) {
			if (this.dragState.dragging) {
				// 获取当前滚动条的位置
				const scrollDom = this.$refs.elTable.bodyWrapper
				this.scrollX = scrollDom.scrollLeft
				const index = parseInt($index - 0) // 记录起始列
				/** 实时更改鼠标处于表头的位置 */
				if (index - this.dragState.start !== 0) {
					this.dragState.direction =
						index - this.dragState.start < 0 ? 'left' : 'right' // 判断拖动方向
					this.dragState.end = parseInt($index - 0)
				} else {
					this.dragState.end = this.dragState.start
					this.dragState.direction = null
				}
			}
		},
		/** 鼠标抬起或拖拽结束触发 */
		handleMouseUp() {
			// 更新拖拽后的表头
			this.headDraged(this.dragState)
			const { end } = this.dragState
			// 初始化拖动状态
			this.dragState = {
				start: end, // 记录最后拖动的位置
				end: -9,
				dragging: false,
				direction: undefined
			}
			document.removeEventListener('mouseup', this.handleMouseUp)
			document.removeEventListener('dragend', this.handleMouseUp)
			setTimeout(() => {
				// 重置拖拽状态
				this.dragState.start = -9
			}, 500)
		},
		// 更新拖拽后的表头
		headDraged({ start, end, direction }) {
			if (direction) {
				const originColumn = this.newCol[start]
				// 有位置交换时，原先位置的元素删除，再在目标处插入
				this.oldCol.splice(start, 1)
				this.oldCol.splice(end, 0, originColumn)
				this.headKey = new Date().getTime() + '' // 更新table key值
				const uu_Id = this.$store.state.user.userInfo.id
				const uidKey = uu_Id + '_commonTableKey_proxyProfitAndLoss'
				const getLocalTableData = Storage.get('commonTableKey')
				if (getLocalTableData) {
					Storage.set(
						'commonTableKey',
						Object.assign(getLocalTableData, {
							[uidKey]: this.oldCol
						})
					)
				} else {
					Storage.set('commonTableKey', {
						[uidKey]: this.oldCol
					})
				}
				this.$nextTick(() => {
					// 因为表头重绘后滚动条会移到最左端初始位置，因此如果是在中间部分拖拽，还需要把滚动条在定位到该位置
					this.$refs.elTable.bodyWrapper.scrollLeft = this.scrollX
				})
			}
		},
		// 拖动虚线样式设置
		cellClassName({ columnIndex }) {
			const { start, end, direction } = this.dragState
			const target = columnIndex - 0
			if (target === start) {
				// 被移动的元素
				return 'drag_start'
			} else if (target === end) {
				// 要移动的位置
				return `drag_end_${direction}`
			}
			return ''
		},
		// 提交列设置数据
		handleOrderList() {
			this.colSettings.visible = false
			const uu_Id = this.$store.state.user.userInfo.id
			const uidKey = uu_Id + '_commonTableKey_proxyProfitAndLoss'
			const getLocalTableData = Storage.get('commonTableKey')
			if (getLocalTableData) {
				Storage.set(
					'commonTableKey',
					Object.assign(getLocalTableData, {
						[uidKey]: this.oldCol
					})
				)
				this.oldCol = getLocalTableData[uidKey]
			} else {
				Storage.set('commonTableKey', {
					[uidKey]: this.oldCol
				})
			}
		},
		// 打开列设置弹框
		openColSettings() {
			this.colSettings.visible = true
		},
		// 取消列设置
		cancleSetColumn() {
			this.colSettings.visible = false
			const getLocalTableData = Storage.get('commonTableKey')
			const uu_Id = this.$store.state.user.userInfo.id
			const uidKey = uu_Id + '_commonTableKey_proxyProfitAndLoss'
			if (getLocalTableData && getLocalTableData[uidKey]) {
				this.oldCol = getLocalTableData[uidKey]
			} else {
				this.oldCol.map((item, index) => {
					item.isShow = true
				})
			}
		},
		clickDel() {
			this.oldCol.map((item, index) => {
				item.isShow = true
			})
		},
		getProxyleve() {
			this.$api.getProxylevelnameList().then((res) => {
				this.proxyleveList = res.data || []
			})
		},
		changeTableSort({ column, prop, order }) {
			this.queryData.orderKey = prop
			if (order === 'ascending') {
				// 升序
				this.queryData.orderType = 'asc'
			} else if (column.order === 'descending') {
				// 降序
				this.queryData.orderType = 'desc'
			} else {
				delete this.queryData.orderKey
				delete this.queryData.orderType
			}
			this.loadData()
		},
		loadData() {
			if (+new Date() - 500 < this.axiosDate) return
			const timeArr = this.searchTime || []
			if (
				this.queryData.orderKey === 'proxyNetwinAmount' &&
				this.dateFlag === '0'
			) {
				delete this.queryData.orderKey
				delete this.queryData.orderType
			}
			let params = {}
			if (this.dateFlag === '0') {
				params = {
					...this.queryData,
					startDate: dayjs(timeArr[0]).format('YYYYMMDD') * 1,
					endDate: dayjs(timeArr[1]).format('YYYYMMDD') * 1,
					...this.getParams(),
					queryRange: this.agentCheckVals.map(Number)
				}
			} else {
				params = {
					...this.queryData,
					startMonth: dayjs(timeArr[0]).format('YYYYMM') * 1,
					endMonth: dayjs(timeArr[1]).format('YYYYMM') * 1,
					...this.getParams(),
					queryRange: this.agentCheckVals.map(Number)
				}
			}
			// const min = dayjs(timeArr[0])
			// const max = dayjs(timeArr[1])
			// const day = dayjs(max).diff(min, 'month')
			// if (this.dateFlag === '0' && day >= 6) {
			// 	this.$message.warning(this.$t('report.6_month'))
			// 	this.total = 0
			// 	return
			// }
			const minM = dayjs(timeArr[0])
			const maxM = dayjs(timeArr[1])
			const month = dayjs(maxM).diff(minM, 'month')
			if (this.dateFlag === '1' && month >= 12) {
				this.$message.warning(this.$t('report.12_months'))
				this.total = 0
				return
			}
			this.loading = true
			this.pageCurrency = this.merchantObj?.currency || ''
			const listApi =
				this.dateFlag === '0'
					? 'reportProxyNetAmountListPage'
					: 'getReportProxyNetAmountMonthList'
			const summaryApi =
				this.dateFlag === '0'
					? 'getReportDaySummary'
					: 'getReportProxyNetAmountMonthSummary'
			for (const k in params) {
				if (params[k] === '' || params[k] === undefined) {
					delete params[k]
				}
			}
			this.$api[listApi](params)
				.then((res) => {
					this.loading = false
					this.axiosDate = +new Date()
					if (res.code === 200) {
						this.tableData = []
						this.tableData = res?.data?.record || []
						this.total = res?.data?.totalRecord || 0
						this.subSummary = res?.data?.summary || {}
					}
				})
				.catch(() => {
					this.loading = false
				})
			this.$api[summaryApi](params)
				.then((res) => {
					this.loading = false
					if (res.code === 200) {
						this.totalSummary = res?.data || {}
					}
				})
				.catch(() => {
					this.loading = false
				})
		},
		search() {
			this.pageNum = 1
			this.oldCol = []
			this.$nextTick(() => {
				if (this.dateFlag === '0') {
					this.oldCol = this.dropCol.day
				} else {
					this.oldCol = this.dropCol.month
				}
			})

			this.loadData()
		},
		otherDialogFn(val) {
			this.rowVal = val
			this.otherDialog = true
		},
		serviceFeeContributionDialogFn(val) {
			this.rowVal = val
			this.serviceFeeContributionDialog = true
		},
		recalculationAdjustmentDialogFn(val, venueName) {
			this.rowVal = val
			this.rowVal.venueName = venueName
			this.recalculationAdjustmentDialog = true
		},
		recalculationAdjustmentRebateDialogFn(val, venueName) {
			this.rowVal = val
			this.rowVal.venueName = venueName
			this.recalculationAdjustmentRebateDialog = true
		},

		dialogData(val, day) {
			let params = {}
			const timeArr = this.searchTime || []
			if (this.dateFlag === '0') {
				params = {
					startDate: dayjs(timeArr[0]).format('YYYYMMDD') * 1,
					endDate: dayjs(timeArr[1]).format('YYYYMMDD') * 1
				}
			} else if (this.dateFlag === '1') {
				params = {
					staticsMonth: val ? val.reportDate : ''
				}
			}
			this.pageNum = 1
			this.rowVal = {
				...params,
				dateFlag: this.dateFlag,
				proxyId: val.proxyId,
				currency: val.currency,
				proxyName: val.proxyName,
				merchantId: val.merchantId
			}
			if (day) {
				this.showDayDialog = true
			} else {
				this.showDialog = true
			}
		},

		venueFeeDetail(val) {
			const time = val.staticsDate.split('-')
			this.rowVal = {
				pagaNum: 1,
				pageSize: 100,
				proxyId: val.proxyId,
				currency: val.currency,
				proxyName: val.proxyName,
				reportMonth: (time[0] + time[1]) * 1
			}
			this.showVenueDialog = true
		},
		reset() {
			this.pageNum = 1
			this.merchantObj = ''
			this.queryData = {
				accountLevelList: [],
				minBetAmount: undefined,
				maxBetAmount: undefined,
				minValidBetAmount: undefined,
				maxValidBetAmount: undefined
			}
			this.dateFlag = '0'
			if (this.dateFlag === '0') {
				const end = dayjs().endOf('day')
				const start = dayjs().startOf('day')
				this.searchTime = [start, end]
			} else {
				const end = dayjs().endOf('day')
				const start = dayjs().startOf('month')
				this.searchTime = [start, end]
			}
			this.accountFlag = 'proxyName'
			if (this.$refs.elTable) {
				this.$refs.elTable.clearSort()
			}
			this.loadData()
		},
		handleExportExcel() {
			const timeArr = this.searchTime || []
			let params = {}
			if (this.dateFlag === '0') {
				params = {
					...this.queryData,
					queryRange: this.agentCheckVals.map(Number),
					startDate: dayjs(timeArr[0]).format('YYYYMMDD') * 1,
					endDate: dayjs(timeArr[1]).format('YYYYMMDD') * 1
				}
			} else {
				params = {
					...this.queryData,
					queryRange: this.agentCheckVals.map(Number),
					startMonth: dayjs(timeArr[0]).format('YYYYMM') * 1,
					endMonth: dayjs(timeArr[1]).format('YYYYMM') * 1
				}
			}
			// const min = dayjs(timeArr[0])
			// const max = dayjs(timeArr[1])
			// const day = dayjs(max).diff(min, 'day')
			// if (this.dateFlag === '0' && day >= 31) {
			// 	this.$message.warning(this.$t('report.31_day'))
			// 	return
			// }
			// const minM = dayjs(timeArr[0])
			// const maxM = dayjs(timeArr[1])
			// const month = dayjs(maxM).diff(minM, 'month')
			// if (this.dateFlag === '1' && month >= 6) {
			// 	this.$message.warning(this.$t('report.6_month'))
			// 	return
			// }
			const httpStr =
				this.dateFlag === '0'
					? 'getReportProxyNetAmountDayExport'
					: 'getReportProxyNetAmountMonthExport'
			this.exportBtnLoading = true
			for (const k in params) {
				if (params[k] === '' || params[k] === undefined) {
					delete params[k]
				}
			}
			this.exportExcelPublic({
				api: httpStr,
				params
			}).finally(() => {
				this.exportBtnLoading = false
			})
		}
	}
}
</script>

<style lang="scss" scoped>
.tips-box {
	position: absolute;
	right: 10px;
	top: 50%;
	margin-top: -12px;
}
::v-deep .el-dialog__header {
	color: #909399;
	font-weight: 700;
}
::v-deep .el-range-editor.el-input__inner {
	padding: 1px 10px;
}
::v-deep .el-table__fixed-footer-wrapper .cell,
::v-deep .el-table__footer-wrapper .cell {
	height: 100%;
	padding: 0 !important;
	margin: 0 !important;
	> div {
		height: 100%;
	}
}
::v-deep .footer_count_row {
	min-height: 50px;
	height: 50%;
	display: flex;
	font-weight: 700;
	padding: 5px 0;
	align-items: center;
	flex-direction: column;
	justify-content: center;
}
::v-deep .footer_count_row_border {
	border-top: 1px solid #ebeef5;
}
* {
	visibility: visible !important;
}
::v-deep .el-icon-question:after {
	font-size: 16px;
	margin-left: 0;
}
::v-deep .is-group th {
	background-color: #f5f7fa !important;
}
</style>
